package cn.edu.scau.dropship.controller;

import cn.edu.scau.dropship.entity.Goods;
import cn.edu.scau.dropship.entity.Order_goods;
import cn.edu.scau.dropship.service.OrderGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/ordergoods")
public class Order_goodsController {
    @Autowired
    private OrderGoodsService order_goodsService;

    @RequestMapping("/selectGoodByOrderID")
    public List<Goods> selectGoodByOrderID(Integer id){
        return order_goodsService.selectGoodByOrderID(id);
    }


    @RequestMapping("/selectOrderGoodsByGoodsIDAndOrderID")
    public Order_goods selectByPrimaryKey(Integer goodsID , Integer  orderID){
        return order_goodsService.selectByPrimaryKey(goodsID , orderID);
    }
}
